package com.wildwolf.project.wildwolf.ui.buddy;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;
import android.view.View;
import com.wildwolf.project.wildwolf.R;
import com.wildwolf.project.wildwolf.ui.chatup.ChatUpActivity;
import com.wildwolf.project.wildwolf.ui.vindicate.VindicateActivity;

public class BuddyActivity extends Activity implements  View.OnClickListener {
	/**
	 * 添加好友
	 */
	private TextView textViewSearch = null;
	/**
	 * 附近的人
	 */
	private TextView textViewNear = null;
	/**
	 * 同城朋友
	 */
	private TextView textViewSameCity = null;
	
	/**
	 * 搭讪花瓣
	 */
	private TextView textViewChatUpPetals= null;
	/**
	 * 一见钟情
	 */
	private TextView textViewAtFirstSight= null;
	/**
	 * 偶遇点签到
	 */
	private TextView textViewMeetWith= null;
	

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.layout_buddy);
		/**
		 * 初始化控件 
		 */
		textViewSearch = (TextView) findViewById(R.id.buddy_textView_search);
		textViewNear = (TextView) findViewById(R.id.buddy_textView_near);
		textViewSameCity = (TextView) findViewById(R.id.buddy_textView_same_city);
		textViewChatUpPetals = (TextView) findViewById(R.id.buddy_textView_chat_up_petals);
		textViewAtFirstSight = (TextView) findViewById(R.id.buddy_textView_love_at_first_sight);
		textViewMeetWith = (TextView) findViewById(R.id.buddy_textView_meet_with);
		/**
		 * 事件绑定
		 */
		textViewSearch.setOnClickListener(this);
		textViewNear.setOnClickListener(this);
		textViewSameCity.setOnClickListener(this);
		textViewChatUpPetals.setOnClickListener(this);
		textViewAtFirstSight.setOnClickListener(this);
		textViewMeetWith.setOnClickListener(this);
		
	}


	@Override
	public void onClick(View v) {
		/**
		 * 
		 */
		Intent intent = null;
		if(v== textViewSearch){
			intent = new  Intent(this, BuddySearchActivity.class);
		
		}else if(v==textViewMeetWith){
			intent = new  Intent(this, ForgatherActivity.class);
		}
		else if(v==textViewAtFirstSight){
			intent = new  Intent(this, VindicateActivity.class);
		}
		else if(v==textViewChatUpPetals){
			intent = new  Intent(this, ChatUpActivity.class);
		}
		else{
			Toast.makeText(this, R.string.expect, Toast.LENGTH_SHORT).show();
			return ;
		}
			startActivity(intent);
	}
}
